#include <cstdio>
#include <set>
#include <tuple>
#include <vector>
constexpr int MaxN = 2e5 + 5;
constexpr long long Mod = 998'244'353;
int n, m, k, q;
int p[MaxN];
int color[MaxN];
long long answer;
std::vector<std::tuple<int, int>> links;
long long fsp(long long x, long long y)
{
    long long res = 1;
    for (; y != 0;)
    {
        if (y & 1)
        {
            res = res * x % Mod;
        }
        x = x * x % Mod;
        y >>= 1;
    }
    return res;
}
void dfs(int u)
{
    if (u > n)
    {
        std::set<int> set;
        for (const auto &[u, v] : links)
        {
            if (color[u] == color[v])
            {
                return;
            }
        }
        for (int i = 1; i <= q; i++)
        {
            set.insert(color[p[i]]);
        }
        answer += fsp(set.size(), k);
        answer %= Mod;
        return;
    }
    for (int i = 1; i <= m; i++)
    {
        color[u] = i;
        dfs(u + 1);
    }
}
int main()
{
    freopen("tree.in", "r", stdin);
    freopen("tree.out", "w", stdout);
    scanf("%d%d%d%d", &n, &m, &k, &q);
    for (int i = 1; i <= q; i++)
    {
        scanf("%d", &p[i]);
    }
    for (int i = 1; i <= n - 1; i++)
    {
        int u, v;
        scanf("%d%d", &u, &v);
        links.push_back({u, v});
    }
    dfs(1);
    printf("%lld\n", answer);
    return 0;
}
